import inspect
import os


def DBG(msg):
    print("[%s:%s:%d DBG] %s" % (os.path.basename(__file__), inspect.currentframe().f_back.f_code.co_name, \
                             inspect.currentframe().f_back.f_lineno, msg))


def INFO(msg):
    print("[%s:%s:%d INFO] %s" % (os.path.basename(__file__), inspect.currentframe().f_back.f_code.co_name, \
                             inspect.currentframe().f_back.f_lineno, msg))


def ERROR(msg):
    print("[%s:%s:%d ERROR] %s" % (os.path.basename(__file__), inspect.currentframe().f_back.f_code.co_name, \
                             inspect.currentframe().f_back.f_lineno, msg))


def EXCEPTION(msg):
    print("[%s:%s:%d EXCEPTION] %s" % (os.path.basename(__file__), inspect.currentframe().f_back.f_code.co_name, \
                             inspect.currentframe().f_back.f_lineno, msg))